<?php

/**
 * Description of ResourceParameter
 *
 * @author gun
 */
class Web_Model_DbTable_ResourceParameter extends Zend_Db_Table_Abstract {
    protected $_name = 'param';
    
    public function findAll($where) {
        $sql = $this->getAdapter()->select()
                ->from($this->_name);
        
        if (is_array($where)) {
            foreach($where as $key=>$value) {
                $sql->where($key, $value);
            }
        }
        
        return $this->_db->fetchAll($sql);
    }
    
    public function findRow($where) {
        $sql = $this->getAdapter()->select()
                ->from($this->_name);
        
        if (is_array($where)) {
            foreach($where as $key=>$value) {
                $sql->where($key, $value);
            }
        }
        
        return $this->_db->fetchRow($sql);
    }
}

?>
